<!-- 导航栏 -->
<nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="{$_URL}">179zy</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
     {foreach from=$columnlist item=vo}
     <li class="nav-item {if !empty($vo.child)}dropdown{/if}">
        <a {if empty($vo.child)} onclick="article_list('{$vo.colid}')" {/if} class="nav-link  {if !empty($vo.child)}dropdown-toggle {/if}" href="#" {if !empty($vo.child)} id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" {/if}>
          {$vo.name}
        </a>
        {if !empty($vo.child)}
        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
          {foreach from=$vo.child item=val}
          <a onclick="article_list('{$val.colid}')" class="dropdown-item" href="#">{$val.name}</a>
          <!-- <div class="dropdown-divider"></div> -->
          {/foreach}
        </div>
        {/if}
      </li>
     {/foreach}
    </ul>
    <form  method="post" action="{$_URL}Home/index" class="form-inline my-2 my-lg-0">
      <input class="form-control mr-sm-2 search" type="search" value="{$search}" name="search" placeholder="" aria-label="Search">
      <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
    </form>
  </div>
</nav>